package com.sen.patterns.behavioral.template.ex2;

import junit.framework.TestCase;

public class Test extends TestCase {
	public void testAdd() {
		double d1 = 10.5, d2 = 9.5;
		float f1 = 11.5f, f2 = 12.5f;
		long l1 = 1, l2 = 2;
		int i1 = 3, i2 = 4;
		short s1 = 7, s2 = 8;
		byte b1 = 5, b2 = 6;

		AddAnyTypeNumber addNumber = new AddAnyTypeNumber();
		
		System.out.println(addNumber.add(d1, d2));
		System.out.println((float) addNumber.add(f1, f2));
		System.out.println((long) addNumber.add(l1, l2));
		System.out.println((int) addNumber.add(i1, i2));
		System.out.println((short) addNumber.add(s1, s2));
		System.out.println((byte) addNumber.add(b1, b2));
	}
}
